C (101/254)

From:Allan Odgaard
Date:02 Apr 00 at 21:15:37
Subject:Re: ObtainPen for my colors

On 01-Apr-00, Duane McDonnell wrote:

>> The proper way to save code is to multiply the 8 bit value with 0x01010101.
>> Btw: 14x17 = 238, which was the maximum value generated by your loop...
> Can you please describe this some more? I'm not sure what this is
> intended to achieve.

Well, the first (i * 0x01010101) gives you a 32 bit colour value with 0 as
0x00000000 and 255 as 0xFFFFFFFF. The 'btw'-remark was in regard to your first
loop, which generated values from 0x17 to 14x17, i.e. colour values from 0 to
238, not 0 to 255.

Regards Allan



URL: http://www.diku.dk/students/duff/


Moral: To do more than required but less than allowed.

------------------------------------------------------------------------
Good friends, school spirit, hair-dos you'd like to forget.
Classmates.com has them all. And with 4.4 million alumni already
registered, there's a good chance you'll find your friends here:
http://click.egroups.com/1/2623/1/_/451227/_/954707834/
------------------------------------------------------------------------